home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8179 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: library.erc.clarkson.edu!rpi!not-for-mail
  2. From: Mike ODowd <odowd@power5.rz.uni-hohenheim.de>
  3. Newsgroups: gnu.g++.help,comp.lang.c++.moderated,comp.lang.c++
  4. Subject: Multiple copies of Virtual Table
  5. Date: 15 Feb 1996 15:20:53 -0000
  6. Organization: Rechenzentrum Universitaet Hohenheim
  7. Sender: cppmods@netlab.cs.rpi.edu
  8. Approved: herbs@connobj.com
  9. Message-ID: <4fvj0l$ii7@netlab.cs.rpi.edu>
  10. NNTP-Posting-Host: netlab.cs.rpi.edu
  11. X-Original-Date: 14 Feb 1996 16:29:34 GMT
  12.  
  13. I have noticed that the size of my code has been growing
  14. at an alarming rate recently. After some investigation, I
  15. discovered that it is due to multiple copies of virtual tables.
  16.  
  17. It seems that each object file that accesses a class, ends up
  18. with a copy of that class' virtual table. I one case, I counted 
  19. 91 object files that contain a copy of the same virtual table.
  20.  
  21. The virtual tables are taking up something like 25% of my code.
  22.  
  23. Please tell me that there is a way around this, that my code size
  24. is not going to expand exponentially.
  25.  
  26. I am using gcc v2.6.0.
  27.  
  28.  
  29.  
  30. Thanks for any help
  31. --------------------------
  32.  Mike O'Dowd                  
  33.  EMail: odowd@lightning.ch  
  34. --------------------------
  35.  
  36.  
  37.       [ Articles to moderate: mailto:c++-submit@netlab.cs.rpi.edu ]
  38.       [  Read the C++ FAQ: http://www.connobj.com/cpp/cppfaq.htm  ]
  39.       [  Moderation policy: http://www.connobj.com/cpp/guide.htm  ]
  40.       [      Comments? mailto:c++-request@netlab.cs.rpi.edu       ]
  41.